# -*- coding: utf-8 -*-
import KBEngine
from KBEDebug import *


class FirstEntity(KBEngine.Proxy):
    """
    completion of FirstEntity
    """
    def __init__(self):
        KBEngine.Entity.__init__(self)


    def onClientEnabled(self):
        """
        """
        print('before onClientEnabled of FirstEntity in base')
        ERROR_MSG('before onClientEnabled of FirstEntity in base')

        first_space = KBEngine.globalData["FirstSpace"]
        ERROR_MSG('after first_space >> ', first_space, type(first_space))
        print(first_space.cell, type(first_space.cell))

        if first_space.cell is None:
            # create cell space
            first_space.createCellEntityInNewSpace(None)

        self.createCellEntity(first_space.cell)
